﻿using System;
using System.Windows.Media;
using System.Windows.Data;
using Telerik.Windows.Controls;

namespace MedLink2011.Views.Patients.Controls.FirstLook.Converters
{
    public class CategoryToAppointmentBackgroundConverter : IValueConverter
    {

        public ImageBrush OceanBrush
        {
            get;
            set;
        }

        public ImageBrush HarmonyBrush
        {
            get;
            set;
        }
        public ImageBrush DiscoBrush
        {
            get;
            set;
        }
        public ImageBrush OrangeBrush
        {
            get;
            set;
        }
        public ImageBrush RelaxBrush
        {
            get;
            set;
        }
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {

            if (value!=null && value is Category)
            {
                switch ((value as Category).CategoryName)
                {
                    case "Ocean": return this.OceanBrush;
                    case "Orange": return this.OrangeBrush;
                    case "Relax": return this.RelaxBrush;
                    case "Disco": return this.DiscoBrush;
                    case "Harmony": return this.HarmonyBrush;
                    default:return this.HarmonyBrush;
                }
            }
            return this.HarmonyBrush;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

    }
}
